<template>
    <el-container>
        <el-header>
            <h1>餐厅详情</h1>
        </el-header>
        <el-main>
            <img :src="restaurant.image" alt="餐厅图片">
            <h2>{{ restaurant.name }}</h2>
            <p>这里是餐厅的介绍信息。</p>
            <!-- 可以添加更多餐厅详情内容 -->
        </el-main>
    </el-container>
</template>

<script>
    export default {
        name: 'RestaurantDetail',
        props: {
            id: {
                type: String,
                default: ''
            }
        },
        data() {
            return {
                restaurant: {
                    name: '未知餐厅',
                    image: '/path/to/default-restaurant.jpg'
                }
            };
        },
        mounted() {
            // 根据id获取餐厅详情，这里只是示例，实际应用中需要调用API
            this.fetchRestaurantDetails(this.id);
        },
        methods: {
            fetchRestaurantDetails(id) {
                // 模拟API请求
                const restaurantDetails = {
                    name: '一食堂麻辣烫',
                    image: '/path/to/restaurant-image.jpg'
                };
                this.restaurant = restaurantDetails;
            }
        }
    };
</script>

<style scoped>
    /* 添加样式 */
</style>